<template>
    <Header />
    <div class="main-container hidden-xs-only">
        <div class="swiper-container">
            <div class="block">
                <el-carousel height="400px" interval="5000">
                    <el-carousel-item v-for="item in 4" :key="item">
                        <img class="swiper-image" src="../static/image.png" alt="">
                    </el-carousel-item>
                </el-carousel>
            </div>
        </div>

        <div class="chooseTime">
            <div class="destination">
                <div class="title">
                    目的地/酒店名称
                </div>
                <div class="input-container">
                    <input class="input-des" type="text">
                </div>
            </div>
            <div class="cutline"></div>
            <div class="time-contaienr">
                <div class="time-title">
                    <div>入住</div>
                    <div>1晚</div>
                    <div>退房</div>
                </div>
                <div class="pickdate">
                    <el-date-picker v-model="liveDate" label-width="100%" type="daterange" unlink-panels range-separator="至"
                        start-placeholder="开始日期" end-placeholder="结束日期" :shortcuts="shortcuts">
                    </el-date-picker>
                </div>
            </div>
        </div>
        <div class="chooseTime">
            <div class="destination2 flex">
                <div style="width: 150px;">
                    <div class="title">
                        房间
                    </div>
                    <div class="input-container">
                        <input class="input-des" type="text">
                    </div>
                </div>
                <div style="width: 150px;">
                    <div class="title">
                        住客
                    </div>
                    <div class="input-container">
                        <input class="input-des" type="text">
                    </div>
                </div>
            </div>
            <div class="cutline"></div>
            <div class="flex" style="width: 46%;justify-content: space-between;align-items: center;">
                <div class="bold">
                    搜索
                </div>
                <div class="input-container" style="width: 300px;">
                    <input class="input-des" type="text">
                </div>
                <div>
                    <el-button type="primary" round>搜索</el-button>
                </div>

            </div>
        </div>
        <div class="exhibitionList-container">
            <div class="exhibition-item" v-for="(item, index) in 7" :key="index" @click="goDetailPage">
                <img class="item-image" src="../static/image.png" alt="">
                <div class="item-info">
                    <div class="item-title">
                        2023 年上海会展业创新发展峰会暨第九届“国际组展人之声”论坛
                    </div>
                    <div>
                        <div>
                            <div class="item-city">-琶洲市</div>
                            <div class="item-address">-广东省琶洲市九星大地会展中心</div>
                            <div class="item-time">-2024年1月11日-1月13日</div>
                        </div>
                        <div class="item-btn">
                            <el-button type="primary" round>热订中</el-button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="describe">
            <div class="des-title">
                我们为展会活动提供会议期间的酒店优惠价格
            </div>
            <div class="des-containr">
                <div class="des-img">
                    <img src="../static/1709883139892.jpg" alt="">
                </div>
                <div class="des-content">
                    <p>2022年， CSE上海泳池SPA展进入第四个年头，乘着每年高速发展的东风，展会规模持续升级，品类也将有更精细化的划分。</p>
                    <p>将休闲水生态产业划分为公共泳池和私家泳池两大门类，加强新产品宣传展示，强化贸易功能，加大专业观众邀请力度，突出市场对接功能，增强现场交流与合作洽谈，为休闲水全行业搭建一个大体量、高质量的一体式速效沟通平台。
                    </p>
                    <p> CSE上海游泳SPA展全称：中国（上海）国际泳池设施、游泳装备及温泉SPA展览会，CSE SHANGHAI
                        2021由国体认证中心、京东运动、上海德纳展览服务有限公司联合主办，国内游泳行业先锋杂志《游泳与装备》作为全程合作媒体。
                        2022CSE上海国际沐浴SPA健康产业博览会
                    </p>
                    <p>2022CSE上海国际婴幼儿游泳产业展览会</p>
                </div>

            </div>
            <div class="des-title">
                300+酒店任你挑选
            </div>
            <div class="skyblue-bg">
                <div>独家的会议期间的优惠价格</div>
                <div>点击预订</div>
            </div>
            <div class="seebtn">
                <el-button type="primary" size="large" round>查 看</el-button>
            </div>
        </div>
    </div>
    <div class="main-container2 hidden-sm-and-up">
        <div class="swiper-container">
            <div class="block">
                <el-carousel height="250px" interval="5000">
                    <el-carousel-item v-for="item in 4" :key="item">
                        <img class="swiper-image" src="../static/image.png" alt="">
                    </el-carousel-item>
                </el-carousel>
            </div>
        </div>

        <div class="chooseTime" style="background-color: #fff;">
            <div class="city">
                <div class="chooseTime-title">选择城市</div>
                <div class="chooseTime-city">
                    <div class="cityname">请选择城市</div>
                    <div><el-icon>
                            <ArrowRightBold />
                        </el-icon></div>
                </div>
            </div>
            <div class="exhibition">
                <div class="chooseTime-title">选择举办中展会</div>
                <div class="chooseTime-city">
                    <div class="cityname">
                        <input type="text" placeholder="搜索展会" style="outline: none;border: none;">
                    </div>
                    <div><el-icon><Search /></el-icon></div>
                </div>
            </div>
            <div class="dateTime">
                <div class="chooseTime-title">选择酒店入住时间</div>
                <div class="chooseTime-city">
                    <div class="cityname"><el-date-picker
                        v-model="inHotelDate"
                        type="date"
                        placeholder="选择时间"
                        :size="size"
                      /></div>
                    <div><el-icon>
                            <ArrowRightBold />
                        </el-icon></div>
                </div>
            </div>
            <el-button style="width:100%;height:60px;font-size:18px;" type="primary">查 询</el-button>
        </div>
        <div class="exhibitionList-container" @click="goDetailPage">
            <div class="exhibition-item" v-for="(item, index) in 7" :key="index">
                <img class="item-image" src="../static/image.png" alt="">
                <div class="item-info">
                    <div class="item-title">
                        2023 年上海会展业创新发展峰会暨第九届“国际组展人之声”论坛
                    </div>
                    <div>
                        <div>
                            <div class="item-city">-琶洲市</div>
                            <div class="item-address">-广东省琶洲市九星大地会展中心</div>
                            <div class="item-time">-2024年1月11日-1月13日</div>
                        </div>
                        <div class="item-btn">
                            <el-button type="primary" round>热订中</el-button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="describe">
            <div class="des-title">
                我们为展会活动提供会议期间的酒店优惠价格
            </div>
            <div class="des-containr">
                <div class="des-img">
                    <img src="../static/1709883139892.jpg" alt="">
                </div>
                <div class="des-content">
                    <p>2022年， CSE上海泳池SPA展进入第四个年头，乘着每年高速发展的东风，展会规模持续升级，品类也将有更精细化的划分。</p>
                    <p>将休闲水生态产业划分为公共泳池和私家泳池两大门类，加强新产品宣传展示，强化贸易功能，加大专业观众邀请力度，突出市场对接功能，增强现场交流与合作洽谈，为休闲水全行业搭建一个大体量、高质量的一体式速效沟通平台。
                    </p>
                    <p> CSE上海游泳SPA展全称：中国（上海）国际泳池设施、游泳装备及温泉SPA展览会，CSE SHANGHAI
                        2021由国体认证中心、京东运动、上海德纳展览服务有限公司联合主办，国内游泳行业先锋杂志《游泳与装备》作为全程合作媒体。
                        2022CSE上海国际沐浴SPA健康产业博览会
                    </p>
                    <p>2022CSE上海国际婴幼儿游泳产业展览会</p>
                </div>

            </div>
            <div class="des-title">
                300+酒店任你挑选
            </div>
            <div class="skyblue-bg">
                <div>独家的会议期间的优惠价格</div>
                <div>点击预订</div>
            </div>
            <div class="seebtn">
                <el-button type="primary" size="large" round>查 看</el-button>
            </div>
        </div>
    </div>
    <Footer />
</template>
<script lang="ts" setup>
import { useI18n } from 'vue-i18n'
import Header from '@/components/Header.vue'
import Map from '@/components/Map.vue'
import Footer from '@/components/Footer.vue'
const { t, locale } = useI18n()
import { ref } from 'vue'
import router from '@/router'
const liveDate = ref('')
const inHotelDate = ref('')
// 跳转到详情页
const goDetailPage = () => {
    console.log('goDetailPage')
    router.push({
        name: 'exhibitionHotel',
    })
}
const shortcuts = [
    {
        text: 'Last week',
        value: () => {
            const end = new Date()
            const start = new Date()
            start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
            return [start, end]
        },
    },
    {
        text: 'Last month',
        value: () => {
            const end = new Date()
            const start = new Date()
            start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
            return [start, end]
        },
    },
    {
        text: 'Last 3 months',
        value: () => {
            const end = new Date()
            const start = new Date()
            start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
            return [start, end]
        },
    },
]
</script>
<style lang="scss" scoped>
@import '@/assets/variables.scss';

.main-container2 {
    :deep(.el-input__wrapper){
        box-shadow: none;
    }
    .describe {
        width: 90%;
        display: flex;
        align-items: center;
        flex-direction: column;
        justify-content: center;
        margin: 0 auto;
        padding: 20px 0;

        .des-title {
            font-size: 26px;
            font-weight: 700;
            color: #475669;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 20px;
        }

        .des-containr {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;

            .des-img {
                width: 100%;
                height: 200px;
                margin-bottom: 20px;
                width: 100%;
                height: 300px;

                img {
                    width: 100%;
                    height: 100%;
                    object-fit: cover;
                }
            }

            .des-content {
                width: 100%;
                font-size: 18px;
                color: #475669;
                margin-bottom: 20px;

                p {
                    margin-bottom: 20px;
                }
            }
        }


        .skyblue-bg {
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 20px 40px;
            width: 100%;
            border-radius: 10px;
            background-image: url('../static/indeximage2.png');
            flex-direction: column;
            background-size: 374px 126px;
            background-repeat: no-repeat;
            background-position: 50% 50%;
            color: #356CEB;
            font-size: 14px;
            font-weight: 600;

        }

        .seebtn {
            display: flex;
            justify-content: center;

        }
    }

    .exhibitionList-container {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-wrap: wrap;

        max-width: $border-primary-max-width;
        margin: 0 auto;

        .exhibition-item:hover {
            box-shadow: 0px 4px 10px 0px rgba(0, 0, 0, 0.3);
        }

        .exhibition-item {
            border-radius: 10px;
            width: 90%;
            margin-bottom: 40px;
            border: 1px solid #ccc;

            .item-image {
                width: 100%;
                height: 200px;
                border-radius: 10px 10px 0 0;
                object-fit: cover;

            }

            .item-info {
                padding: 10px 20px 20px 20px;

                .item-title {
                    font-size: 20px;
                    font-weight: 700;
                    color: #475669;
                    margin-bottom: 10px;
                }

                .item-city {
                    font-size: 14px;
                    color: #475669;
                    margin-bottom: 10px;
                }

                .item-address {
                    font-size: 14px;
                    color: #475669;
                    margin-bottom: 10px;
                }

                .item-time {
                    font-size: 14px;
                    color: #475669;
                    margin-bottom: 10px;
                }

                .item-btn {
                    display: flex;
                    justify-content: flex-end;
                }
            }

        }
    }

    .swiper-container {
        background-color: #fff;

        margin: 0 auto;

        .swiper-image {
            width: 100%;
            height: 250px;
            object-fit: cover;
        }
    }

    .chooseTime {
        position: relative;
        box-sizing: border-box;
        display: flex;
        justify-content: center;
        flex-direction: column;
        align-items: center;
        border-radius: 10px;
        margin: -30px auto 20px;
        box-shadow: 0px 4px 10px 0px rgba(0, 0, 0, 0.3);
        width: 90%;
        background-color: #fff;
        
        .city {
            display: flex;
            padding: 20px;
            flex-direction: column;
            border-bottom: 1px dashed #D8D8D8;
            width: 100%;

            .chooseTime-title {
                font-size: 16px;
                color: #817F7F;
                /* margin-bottom: 10px; */
            }

            .chooseTime-city {
                display: flex;
                justify-content: space-between;
                align-items: center;
                padding: 10px 20px;
                border-bottom: 1px solid #D8D8D8;

                .cityname {
                    font-size: 16px;
                    color: #817F7F;
                }
            }
        }

        .exhibition {
            display: flex;
            padding: 20px;
            flex-direction: column;
            border-bottom: 1px dashed #D8D8D8;
            width: 100%;

            .chooseTime-title {
                font-size: 16px;
                color: #817F7F;
                /* margin-bottom: 10px; */
            }

            .chooseTime-city {
                display: flex;
                justify-content: space-between;
                align-items: center;
                padding: 10px 20px;
                border-bottom: 1px solid #D8D8D8;

                .cityname {
                    font-size: 16px;
                    color: #817F7F;
                }
            }
        }

        .dateTime {
            display: flex;
            flex-direction: column;
            width: 100%;
            padding: 20px;

            .chooseTime-title {
                font-size: 16px;
                color: #817F7F;
                /* margin-bottom: 10px; */
            }

            .chooseTime-city {
                display: flex;
                justify-content: space-between;
                align-items: center;
                padding: 10px 20px;
                border-bottom: 1px solid #D8D8D8;

                .cityname {
                    font-size: 16px;
                    color: #817F7F;
                }
            }
        }

        .destination {
            display: flex;
            flex-direction: column;
            width: 46%;

            .title {
                font-size: 16px;
                color: #817F7F;
                margin-bottom: 10px;
            }

            .input-container {
                input {
                    width: 100%;
                    height: 40px;

                    border: none;
                    border-bottom: 1px solid #D8D8D8;
                    padding: 0 10px;
                }

                input:focus {
                    outline: none;
                }
            }
        }
        
        .cutline {
            position: absolute;
            width: 1px;
            height: 80px;
            background-color: #D8D8D8;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
        }

        .time-contaienr {
            display: flex;
            flex-direction: column;
            width: 46%;

            .time-title {
                display: flex;
                justify-content: space-between;
                margin-bottom: 10px;

                div {
                    font-size: 16px;
                    color: #817F7F;
                }
            }

            .pickdate {
                width: 100%;
            }
        }

    }

}

.main-container {
    .describe {
        max-width: $border-primary-max-width;
        margin: 0 auto;
        padding: 20px 0;

        .des-title {
            font-size: 26px;
            font-weight: 700;
            color: #475669;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 20px;
        }

        .des-containr {
            display: flex;

            .des-img {
                width: 100%;
                height: 200px;
                margin-bottom: 20px;
                margin-right: 40px;
                width: 30%;
                height: 300px;

                img {
                    width: 100%;
                    height: 100%;
                    object-fit: cover;
                }
            }

            .des-content {
                width: 70%;
                font-size: 18px;
                color: #475669;
                margin-bottom: 20px;

                p {
                    margin-bottom: 20px;
                }
            }
        }


        .skyblue-bg {
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 20px 40px;
            height: 226px;
            border-radius: 10px;
            background-image: url('../static/indeximage2.png');
            flex-direction: column;
            background-size: cover;
            background-position: 0 50%;
            color: #356CEB;
            font-size: 16px;
            font-weight: 600;

            div {
                margin-bottom: 10px;

            }
        }

        .seebtn {
            display: flex;
            justify-content: center;

        }
    }

    .exhibitionList-container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;

        max-width: $border-primary-max-width;
        margin: 0 auto;

        .exhibition-item:hover {
            box-shadow: 0px 4px 10px 0px rgba(0, 0, 0, 0.3);
        }

        .exhibition-item {
            border-radius: 10px;
            width: 32%;
            margin-bottom: 40px;
            border: 1px solid #ccc;

            .item-image {
                width: 100%;
                height: 200px;
                border-radius: 10px 10px 0 0;
                object-fit: cover;

            }

            .item-info {
                padding: 10px 20px 20px 20px;

                .item-title {
                    font-size: 20px;
                    font-weight: 700;
                    color: #475669;
                    margin-bottom: 10px;
                }

                .item-city {
                    font-size: 14px;
                    color: #475669;
                    margin-bottom: 10px;
                }

                .item-address {
                    font-size: 14px;
                    color: #475669;
                    margin-bottom: 10px;
                }

                .item-time {
                    font-size: 14px;
                    color: #475669;
                    margin-bottom: 10px;
                }

                .item-btn {
                    display: flex;
                    justify-content: flex-end;
                }
            }

        }
    }

    .swiper-container {
        background-color: #fff;

        margin: 0 auto;

        .swiper-image {
            width: 100%;
            height: 400px;
            object-fit: cover;
        }
    }

    .chooseTime {
        position: relative;
        box-sizing: border-box;
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-radius: 10px;
        padding: 20px 40px;
        margin: 40px auto;
        box-shadow: 0px 4px 10px 0px rgba(0, 0, 0, 0.3);
        max-width: $border-primary-max-width;

        .destination {
            display: flex;
            flex-direction: column;
            width: 46%;

            .title {
                font-size: 16px;
                color: #817F7F;
                margin-bottom: 10px;
            }

            .input-container {
                input {
                    width: 100%;
                    height: 40px;

                    border: none;
                    border-bottom: 1px solid #D8D8D8;
                    padding: 0 10px;
                }

                input:focus {
                    outline: none;
                }
            }
        }
        .destination2 {
            display: flex;
            justify-content: space-between;
            width: 46%;

            .title {
                font-size: 16px;
                color: #817F7F;
                margin-bottom: 10px;
            }

            .input-container {
                input {
                    width: 100%;
                    height: 40px;

                    border: none;
                    border-bottom: 1px solid #D8D8D8;
                    padding: 0 10px;
                }

                input:focus {
                    outline: none;
                }
            }
        }

        .cutline {
            position: absolute;
            width: 1px;
            height: 80px;
            background-color: #D8D8D8;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
        }
        .input-container {
                input {
                    width: 100%;
                    height: 40px;

                    border: none;
                    border-bottom: 1px solid #D8D8D8;
                    padding: 0 10px;
                }

                input:focus {
                    outline: none;
                }
            }
        .time-contaienr {
            display: flex;
            flex-direction: column;
            width: 46%;

            .time-title {
                display: flex;
                justify-content: space-between;
                margin-bottom: 10px;

                div {
                    font-size: 16px;
                    color: #817F7F;
                }
            }

            .pickdate {
                width: 100%;
            }
        }

    }

}

.el-carousel__item h3 {
    color: #475669;
    font-size: 14px;
    opacity: 0.75;
    background-image: url('../static/image.png');
    line-height: 150px;
    margin: 0;
}

.el-carousel__item:nth-child(2n) {
    background-color: #99a9bf;
}

.el-carousel__item:nth-child(2n + 1) {
    background-color: #d3dce6;
}

:deep(.el-range-editor.el-input__wrapper) {
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    width: 100%;
}</style>